@page
@{ Layout = "_LayoutApp"; }
@section Styles{
    <style>
        .el-form-item {
            margin-bottom: 0px;
        }
        .el-progress-bar__outer{
            background-color:#fafafa !important;
        }

    </style>
}
<div style="position:fixed;left:0;top:0;width:100%;" class="text-center py-3 bg-white z-1">
    刷题记录
</div>
<div class="pb-8"></div>
<div class="z-2" v-if="total>0">
    <div class="card-hover-with-icon" v-for="(practice,index) in list" v-on:click="goPracticeResult(practice.id)">
        <el-card shadow="hover" class="mb-2">
            <div class="d-flex justify-content-between align-items-center">
                <div>
                    <div class="mb-2 fw-light fs-5">
                        {{ utils.getFriendlyDateTime(practice.createdDate) }}
                    </div>
                    <div class="mb-2">
                        <span class="fw-bold">{{ practice.title }}</span>
                    </div>
                    <ul class="list-inline fw-light">
                        <li class="list-inline-item fs-5">
                            答题：{{ practice.answerCount }}
                        </li>
                        <li class="list-inline-item fs-5">
                            正确：{{ practice.rightCount }}
                        </li>
                    </ul>
                </div>
                <div class="text-center">
                    <el-progress width="88" type="dashboard" color="#5cb87a" :percentage="utils.formatPercentFloat(practice.rightCount, practice.answerCount)"></el-progress>
                    <div class="fs-6 fw-light mt-1">正确率</div>
                </div>
            </div>
        </el-card>
    </div>
    <div class="my-5 text-center">
        <el-button size="small" icon="el-icon-refresh-right" v-if="list.length>0 && list.length<total" v-on:click="btnLoadMoreClick" :loading="loadMoreLoading">加载更多</el-button>
        <span v-else class="fw-light fs-6">没有更多了</span>
    </div>
</div>
<div class="pt-10" v-else>
    <el-empty></el-empty>
</div>
<div class="py-8"></div>
<div style="position:fixed;left:0;bottom:0;width:100%;" class="text-center mb-5 animate__animated animate__fadeInUp">
    <el-button-group class="btn-group p-1 bg-gray-300 rounded-pill">
        <el-button type="warning" icon="el-icon-delete" v-on:click="btnClearClick" class="rounded-start-pill">清空记录</el-button>
        <el-button v-on:click="location.href=utils.getRootUrl('mine')" icon="el-icon-back" class="rounded-end-pill">返 回</el-button>
    </el-button-group>
</div>
@section Scripts{
    <script src="/sitefiles/assets/js/app/exam/examPracticeLog.js" type="text/javascript"></script>
}